package xiangmu;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class bb {
    public static void main(String[] args) {
        Map<String,Integer> map = new HashMap<String,Integer>();
        map.put("a", 1);
        map.put("b", 2);
        map.put("c", 3);
        map.put("d", 4);
        System.out.println(map.get("a"));
        System.out.println(map.containsKey("a"));
        System.out.println(map.containsValue("a"));
        System.out.println(map);
        Integer b = map.remove("b");
        System.out.println(b);

        Set<String> keys = map.keySet();
        System.out.println(keys);

        System.out.println(map.values());

        for (String key : keys) {
            System.out.println(key+map.get(key));
        }
    }
}
